package 第二个作业;

class 园 {
    public int x,y,r;
    public double s,z;
    public void setR(int r) {
        this.r = r;
    }
    //方法计算面积和周长
    public double ges(int r) {
        double s1=3.14*r*r;
        return s1;
    }
    public double gez(int r) {
        double s1=3.14*r*2;
        return s1;
    }
    public int getR() {
        return r;
    }
    public double getS() {
        return ges(r);
    }
    public double getZ() {
        return gez(r);
    }
}
